// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   PostValidator.java

package dale.web.post.domain;

import org.springframework.validation.*;

// Referenced classes of package dale.web.post.domain:
//            Post

public class PostValidator
    implements Validator
{

    public PostValidator()
    {
    }

    public boolean supports(Class clazz)
    {
        // return dale/web/post/domain/Post.isAssignableFrom(clazz);
    	return false;
    }

    public void validate(Object target, Errors errors)
    {
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "category.categoryID", "category.validatoin.categoryID");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "title", "category.validatoin.title");
        Post post = (Post)target;
        String title = post.getTitle();
        if(title.length() > 100)
            errors.rejectValue("title", "category.validatoin.title");
    }
}
